| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
As range
## sink("model/threshold_baseline.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[PredPlant[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3528
## Total graph size: 17668
##
## Initializing model
## sink("model/threshold_attraction.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=inverse(vCov*gamma)
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,10)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3602
## Total graph size: 30651
##
## Initializing model
Mean phylogenetic covariance
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,10)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(1,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3602
## Total graph size: 30650
##
## Initializing model
Mean phylogenetic covariance martix
## sink("model/threshold_attraction.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=inverse(vCov*gamma)
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,10)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(0,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3602
## Total graph size: 30807
##
## Initializing model
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,10)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(1,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3602
## Total graph size: 30806
##
## Initializing model
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,10)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(1,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3602
## Total graph size: 30806
##
## Initializing model
Mean interaction covariance
## sink("model/threshold_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #Observation of a flowering plant
## Y[x] ~ dbern(p[x])
## logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##
## #Residuals
## discrepancy[x] <- abs(Y[x] - p[x])
##
## #Assess Model Fit
## Ynew[x] ~ dbern(p[x])
## discrepancy.new[x]<-abs(Ynew[x] - p[x])
## }
##
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for(x in 1:Npreds){
## #predict value
##
## #Observation - probability of flowering
## prediction[x] ~ dbern(p_new[x])
## logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##
## #predictive error
## pred_error[x] <- abs(Ypred[x] - prediction[x])
## }
##
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(x in 1:Sites){
## for(y in 1:Months){
## e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
## }
## }
##
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.386)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,10)
##
## #Strength of covariance decay
## lambda_cov ~ dunif(1,5)
## omega = 1
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2800
## Unobserved stochastic nodes: 3602
## Total graph size: 30806
##
## Initializing model
Mean interaction covariance martix
The probability of occurrence.
## # A tibble: 6 x 2
## Model p
## <chr> <dbl>
## 1 interaction_attraction 0.724
## 2 interaction_repulsion 0.746
## 3 phylogenetic_attraction 0.85
## 4 phylogenetic_repulsion 0.698
## 5 trait_attraction 0.836
## 6 trait_repulsion 0.778
| Model | mean | lower | upper |
|---|---|---|---|
| trait_attraction | 0.2023084 | 0.1949602 | 0.2094650 |
| phylogenetic_attraction | 0.2014100 | 0.1945216 | 0.2095568 |
| trait_repulsion | 0.1923697 | 0.1805013 | 0.2027663 |
| interaction_repulsion | 0.1863426 | 0.1764860 | 0.1967379 |
| interaction_attraction | 0.1847405 | 0.1749398 | 0.1941953 |
| phylogenetic_repulsion | 0.1817221 | 0.1726394 | 0.1908291 |
Without baseline
Zoom in
| Model | mean | lower | upper |
|---|---|---|---|
| baseline | 0.3620644 | 0.3333333 | 0.3921569 |
| phylogenetic_attraction | 0.2605014 | 0.2394958 | 0.2829132 |
| trait_attraction | 0.2578627 | 0.2352241 | 0.2815126 |
| trait_repulsion | 0.2526078 | 0.2296919 | 0.2745098 |
| interaction_repulsion | 0.2480308 | 0.2268908 | 0.2717087 |
| interaction_attraction | 0.2474034 | 0.2254902 | 0.2689076 |
| phylogenetic_repulsion | 0.2435154 | 0.2212885 | 0.2633053 |